09. Exercise: Fix the Lifecycle Display

Fix the Lifecycle Display and Exercise

Complete the TODOs for the third exercise.

Exercise Code

Exercise: T05a.03-Exercise-FixLifecycleDisplayBug

Verify that onStop and onDestroy now work on rotate. After completing these TODOs, hit home and re-launch the app to answer the quiz below.

Also note: onDestroy and onStop will not be displayed unless the ArrayList of callbacks is declared as a static variable.

Fix the Lifecycle Display Exercise

After re-launching the app, what additional lifecycle event do you see that is not in the onDestroy method?

SOLUTION: onRestart